package com.sportschain.app.circle.activity;

import android.support.v7.widget.DividerItemDecoration;
import android.support.v7.widget.RecyclerView;
import android.view.View;
import android.widget.EditText;
import android.widget.TextView;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.sportschain.app.R;
import com.sportschain.app.core.base.BaseActivity;

import java.util.ArrayList;
import java.util.List;

import butterknife.BindView;

public class MomentDetailActivity extends BaseActivity {


    @BindView(R.id.comment_rv)
    RecyclerView mCommentRv;
    @BindView(R.id.comment_content_et)
    EditText mCommentContentEt;
    @BindView(R.id.send_comment_tv)
    TextView mSendCommentTv;

    private CommentAdapter mCommentAdapter;

    @Override
    public int getLayoutId() {
        return R.layout.activity_moment_detail;
    }

    @Override
    public void initView() {
        mCommentAdapter = new CommentAdapter();
        mCommentAdapter.setHeaderAndEmpty(true);
        mCommentAdapter.bindToRecyclerView(mCommentRv);
        mCommentAdapter.addHeaderView(View.inflate(mActivity, R.layout.header_moment_detail, null));
        mCommentAdapter.addFooterView(View.inflate(mActivity, R.layout.footer_rv_common, null));
        mCommentRv.addItemDecoration(new DividerItemDecoration(mActivity, DividerItemDecoration.VERTICAL));
    }

    @Override
    public void initData() {
        List data = new ArrayList();
        for (int i = 0; i < 8; i++) {
            data.add(new Object());
        }
        mCommentAdapter.setNewData(data);
    }

    @Override
    public void initListener() {

    }

    private static class CommentAdapter extends BaseQuickAdapter<Object, BaseViewHolder> {
        public CommentAdapter() {
            super(R.layout.item_comment);
        }

        @Override
        protected void convert(BaseViewHolder helper, Object item) {

        }
    }
}
